<!-- 赛事订单 -->
<template>
	<view class="item-block">
		
		<view class="bot-item">
			
			<view class="item-list">
				<view class="list_item">
					<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="lower"
						:style="{ height: `calc(100vh - 20px)` }">
						<view class="polular_list_item" v-for="(item,index) in datalist" :key="index"
							>
							<view class="item_left">
								<view class="title_item">
									{{ item.raceName.length > 10 ? item.raceName.slice(0, 10) + '...' : item.raceName }}
								</view>
								<view class="team_item">
									队伍名称：{{item.teamName}}
								</view>
								<view class="team_item">
									支付金额：{{item.entryFee}}元
								</view>
								<view class="team_item">
									支付时间：{{item.payTime}}
								</view>
							</view>
							<view class="item_right">
								<view class="" style="color: #ababab; font-size: 14px;">
									已完成
								</view>
								<view class=""  style="color: #6a6a6a; font-size: 15px;">
									{{item.payType==1?'创建队伍':(item.payType==2?'加入队伍':'分享支付')}}
								</view>
							</view>
						</view>
						<u-loadmore line :status="status" :loading-text="loadingText" :nomore-text="nomoreText"
							v-if="this.pagetotal!=0" />
					</scroll-view>
				</view>
			</view>
		</view>
	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				datalist: [],
				query: {
					pagNum: 1,
					pageSize: 10,
					
				},
				status: 'loading',
				loadingText: '努力加载中',
				nomoreText: '没有更多了',

				pagetotal: 0,
			}
		},
		created() {

		},
		onLoad(options) {
		
		},
		mounted() {
			this.eventlist()


		},
		methods: {
			eventlist() {
				const that = this
				this.$request(`/mine/raceOrder`, 'post', this.query)
					.then(
						res => {
							const array = res.data.data.records
							this.datalist = this.datalist.concat(array)
							this.pagetotal = res.data.data.total
							if (this.pagetotal == this.datalist.length||res.data.data.total==0) {
								this.status = 'nomore'
							}

						})
			},
		
			lower() {
				this.status = 'loading'
				
				// setTimeout(() => {
					this.query.pagNum++
					this.eventlist()
				// }, 2000);
			},
			
			
		}
	}
</script>

<style scoped lang="scss">
	.item-block {
		height: 100vh;

		::-webkit-scrollbar {
			width: 0px;
			/* 滚动条的宽度 */
		}

		.header-search {
			padding: 10px 20px;

			::v-deep .u-input {
				background-color: #f6f7f9;
				// border: 1px solid #dededf;
				border-radius: 18px;
				box-shadow: 0 0 2px #b9b9ba;

				/* 添加阴影 */
				.u-icon__icon {
					color: #de3600 !important;
					font-size: 25px !important;
					font-weight: 700 !important;

				}
			}
		}

		.bot-item {
			height: calc(100vh  - 20px);
			background-color: #f4f4f4;
			border-radius: 15px 15px 0 0;
			padding: 10px 20px;

			::v-deep .u-input {
				border-bottom: 1px solid #d1d1d1;

			}

			.item-list {
				margin-top: 10px;

				.polular_list_item {
					background-size: 100% auto;
					margin-bottom: 10px;
					height: 95px;
					background-color: #fff;
					border-radius: 10px;
					box-shadow: 0 0 2px #b9b9ba;
					padding: 8px 15px;
					display: flex;
					justify-content: space-between;
					position: relative;

					.but_img {
						position: absolute;
						height: 25px;
						width: 35px;
						background-size: 100% 100%;
						bottom: 13px;
						right: 72px;
						z-index: 9;
					}

					.item_left {
						display: flex;
						flex-direction: column;
						justify-content: space-between;

						.title_item {
							font-size: 32rpx;
							font-weight: 600;
						}

						.team_item {
							font-size: 12px;
							color: #afafaf;
						}

						.address_item {
							margin-top: 20px;

							.icon-dizhi {
								font-size: 13px;
								border-radius: 10px;
								padding: 2px;
								background-color: #de3600;
								color: #fff;
								margin-right: 3px;
							}

							.address_text {
								font-size: 12px;
								color: #afafaf;
							}
						}
					}

					.item_right {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						align-items: flex-end;

						.right_top {
							font-size: 10px;
							color: #afafaf;
							display: flex;
							flex-direction: column;
							align-items: flex-end;

						}

						::v-deep .u-button {
							color: #f6f7f9;
							border: 0px;
							border-radius: 30px;
							background-color: #de3600;
							height: 30px;
							width: 75px;
						}
					}
				}

			}
		}
	}
</style>